package com.zcyh.exam.controller.admin;

import com.zcyh.exam.constants.EnumConstants;
import com.zcyh.exam.constants.defal.EnumHelper;
import com.zcyh.exam.constants.defal.EnumItem;
import com.zcyh.exam.model.common.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author timo 2021/3/31
 */
@RestController
@RequestMapping("/system/common")
@Slf4j
public class CommonController {

    /**
     * 获取所有题型
     * @return
     */
    @GetMapping("getAllQuestionType")
    public Result getAllQuestionType() {
        List<EnumItem> enumList = EnumHelper.getEnumList(EnumConstants.QuestionType.class);
        return Result.success(enumList);
    }

}
